import {baseUrl} from "@/config/env";

export default () => {
    return {
        submitText: '修改',
        size: 'small',
        labelWidth: 120,
        index: true,
        indexLabel: "序号",
        menuAlign: 'center',
        menuPosition: "right",
        searchIndex: 1,
        searchIcon: true,
        menuType: "menu",
        permissionBtn: {
            addBtn: 'start:sys:sysQuartz:add',
            editBtn: 'start:sys:sysQuartz:edit',
            viewBtn: 'start:sys:sysQuartz:info',
            delBtn: 'start:sys:sysQuartz:delete',
        },
        column: [
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "id",
                "prop": "id",
                "hide": true,
                "type": "input"
            },

            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "定时任务名称",
                "prop": "name",
                "showColumn": true,
                "type": "input"
            },
            {
                "addDisplay": true,
                "editDisplay": false,
                "label": "定时组名称",
                "prop": "groupKey",
                "showColumn": true,
                "type": "select",
                dicUrl: baseUrl + "/start/sysDictionaryItem/listByDictionaryCode",
                dicMethod: "get",
                dicQuery: {code: "timer_group"},
                props: {
                    label: 'name',
                    value: 'id',
                },
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "类路径",
                "prop": "classPath",
                "showColumn": true,
                "type": "input",
                width: 80,
                overHidden: true,
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "cron 表达式",
                "prop": "cron",
                "showColumn": true,
                "type": "input"
            },
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "状态",
                "prop": "isEnable",
                "showColumn": true,
                "type": "radio",
                width: 60,
                value: 0,
                dicData: [
                    {
                        label: "启用",
                        value: 1
                    }, {
                        label: "停止",
                        value: 0
                    },
                ]
            },
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "首次开始时间",
                "prop": "startTime",
                "showColumn": true,
                "type": "datetime",
                format: "yyyy-MM-dd HH:mm:ss"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "上次执行时间",
                "prop": "prevFireTime",
                "showColumn": true,
                "type": "datetime",
                format: "yyyy-MM-dd HH:mm:ss"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "下一次执行时间",
                "prop": "nextFireTime",
                "showColumn": true,
                "type": "datetime",
                format: "yyyy-MM-dd HH:mm:ss"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "结束时间",
                "prop": "endTime",
                "showColumn": true,
                "type": "datetime",
                format: "yyyy-MM-dd HH:mm:ss"
            }, {
                "addDisplay": false,
                "editDisplay": false,
                "label": "执行状态",
                "prop": "triggerState",
                "showColumn": true,
                "type": "select",
                width: 80,
                dicData: [
                    {label: "等待", value: "WAITING"},
                    {label: "暂停", value: "PAUSED"},
                    {label: "正常执行", value: "ACQUIRED"},
                    {label: "阻塞", value: "BLOCKED"},
                    {label: "错误", value: "ERROR"},
                ]
            },
            {
                "addDisplay": true,
                "editDisplay": true,
                "label": "描述信息",
                "prop": "describe",
                "showColumn": true,
                "type": "textarea",
                span: 24,
                width: 120,
                showWordLimit: true,
                maxlength: 100,
            },

            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "创建人",
                "prop": "createBy",
                "hide": true,
                "type": "input"
            },
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "创建时间",
                "prop": "createTime",
                "hide": true,
                "type": "datetime"
            },
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "修改人",
                "prop": "updateBy",
                "hide": true,
                "type": "input"
            },
            {
                "addDisplay": false,
                "editDisplay": false,
                "label": "修改时间",
                "prop": "updateTime",
                "hide": true,
                "type": "datetime"
            }]

    }
}
